package com.simple.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.simple.pojo.User;

@RestController
@RequestMapping("/user")
public class UserController {

	@RequestMapping("/{id}")
	public User showUser(@PathVariable("id")Long id) {
		User user = new User();
		user.setId(id);
		user.setName("zhangsan");
		user.setPassword("123456");
		return user;
	}
	
	@RequestMapping("/index")	
	public String toIndex(){
		return "index";
	}
	
	
}
